level = 1
num_lives = 5
score = 0
time_elapsed = 0

-- TODO: the game starts
-- 这个then和end实在是太出戏了，我永远记得这么奇怪的东西。
if score >= 1000 then
    level = level + 1
    num_lives = 5
else
    time_elapsed = time_elapsed + 1
end

print("Level: "..level)
print("Score: "..score)
print("Lives: "..num_lives)
print("Time Elapsed: "..time_elapsed)

menu_option = 1
-- Lua中的不等于是~=，其它的都一致
result = value1 ~= value2

if menu_option == 1 then
    menu_text = "Can I play, Daddy?"
elseif menu_option == 2 then
    menu_text = "Don't hurt me."
end

print("Menu Option: "..menu_text)

-- Lua中的逻辑操作符
-- or 逻辑或
-- and 逻辑与
-- not 逻辑非
con1 = true
con2 = false
if con1 or con2 then
    print("con1 or con2 is true")    
else
    print("con1 or con2 is false")    
end
if con1 and con2 then
    print("con1 and con2 is true")    
else
    print("con1 and con2 is false")    
end
if not con1 then
    print("not con1 is true")    
else
    print("not con1 is false")    
end